#if UNITY_STANDALONE || UNITY_ANDROID || UNITY_IOS || UNITY_WSA || UNITY_WEBGL
using Net.Client;
using Net.Share;
using System;
using System.Collections.Generic;

namespace Net.Component
{
    public partial class ClientManager
    {
        [Obsolete("请使用大写的Client属性")]
        public ClientBase client { get => Client; set => Client = value; }
    }
}

namespace Net.UnityComponent
{
    public partial class NetworkSceneManager
    {
        [Obsolete("请使用Collection代替", true)]
        public List<NetworkObject> registerObjects { get; set; }

        [Obsolete("请使用OnOperationOther代替", true)]
        public virtual void OnOtherOperator(in Operation opt) { }

        [Obsolete("请使用另外一个RegisterOperationCommand方法, 第一个参数类型是long值")]
        public void RegisterOperationCommand(byte cmd, OnOperationEvent operCall)
        {
            if (!Commands.TryGetValue(cmd, out var operList))
                Commands.Add(cmd, operList = new());
            operList.onOperationEvent += operCall;
        }

        [Obsolete("请使用另外一个RegisterOperationCommand方法, 第一个参数类型是long值")]
        public void RemoveOperationCommand(byte cmd, OnOperationEvent operCall)
        {
            if (!Commands.TryGetValue(cmd, out var operList))
                Commands.Add(cmd, operList = new());
            operList.onOperationEvent -= operCall;
        }
    }
}
#endif